<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<form:form commandName="model" cssClass="validate"
	action="app/sequence/save">
	<form:hidden path="id" />
	<div class="header">
		<h2>&nbsp;&nbsp;流水号配置</h2>
	</div>
	<table class=" form-table">
		<tbody>
			<tr>
				<td class="td1">名称：</td>
				<td class="td2"><form:input path="name" cssClass="required" />
				</td>
			</tr>
			<tr>
				<td class="td1">表名：</td>
				<td class="td2"><form:input path="tableName" cssClass="hidden" />
					<isperp:listSelector id="tableNameSelector"
						valueControlId="tableName" displayValueCssClass="required"
						url="db/entity/showTables" valueColumn="table_name"
						displayValue="${model.tableName }"
						displayColumn="table_name" showPager="false">
						<isperp:column name="table_name" title="表名称" width="100"></isperp:column>
						<isperp:column name="table_rows" title="总行数" width="30"></isperp:column>
						<isperp:column name="create_time" title="创建时间" width="50"></isperp:column>
					</isperp:listSelector>
				</td>
			</tr>
			<tr>
				<td class="td1">字段名：</td>
				<td class="td2"　><form:input path="columnName"
						cssClass="required" /></td>
			</tr>
			<tr>
				<td class="td1">应用规则：</td>
				<td class="td2"　><form:input path="seqRule" cssClass="required" />(年：yyyy，月：MM，日：dd)
				</td>
			</tr>
			<tr>
				<td class="td1">序列号重置周期：</td>
				<td class="td2"><form:select path="seqResetType"
						cssClass="required">
						<form:option value="1" label="每年"></form:option>
						<form:option value="2" label="每月"></form:option>
						<form:option value="3" label="每日"></form:option>
					</form:select>
				</td>
			</tr>
			<tr>
				<td class="td1">规则说明：</td>
				<td class="td2"><form:input path="seqRuleDesc"
						cssClass="required" />
				</td>
			</tr>
			<tr>
				<td class="td1">序列号：</td>
				<td class="td2"　>${model.seqNumber } (<fmt:formatDate
						value="${model.lastSeqDate }" pattern="yyyy-MM-dd HH:mm" />生成)</td>
			</tr>
			<tr>
				<td class="td1">排列顺序：</td>
				<td class="td2"　><form:input path="orderNum" cssClass="number" />
				</td>
			</tr>
		</tbody>
	</table>

</form:form>
<isperp:buttonList>
	<button class="submit" onclick="isperp.submitForm();return false;">
		<span class="icon icon-save"></span>提交
	</button>
</isperp:buttonList>
